/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.cvut.fel.taskpro.business.imanager;

import cz.cvut.fel.taskpro.business.support.BusinessRuleException;
import cz.cvut.fel.taskpro.data.entity.AssignmentSubmit;
import cz.cvut.fel.taskpro.data.entity.VersionFile;
import java.util.List;
import javax.ejb.Local;

/**
 * This class is responsible for business action with version of assignment submit
 * @author Tom
 * @version 1.0.0. beta
 */
@Local
public interface IVersionBusiness {
    /**
     * This method ask dataLayer for all version which submitted with assignmentSubmit
     * in parameter
     * @param assignmentSubmit submitted assignemnts who has version file which will be found
     * @return <code>List</code> of version file, which are part of submitted assignment in parameter.
     */
    public List<VersionFile> getAllVersionFileByAssingment(AssignmentSubmit assignmentSubmit);
    /**
     * This method update version. Validation is necessary. Method ask validator
     * to validate and data manager to update this version.
     * If validation fail then BusinessRuleException will invoke.
     * @param version versions to update. Validation is provided.
     */
    public void updateVersion(List<VersionFile> version) throws BusinessRuleException;
}
